package com.medialog.am.db;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

import org.apache.log4j.Logger;


public class DbConnector {

	static Logger logger = Logger.getLogger(DbConnector.class);
	
	private Connection con;
	private ResultSet rs;
	private java.sql.PreparedStatement psmt;
	private String userId;
	private String JdbcHostName;
	private String password;
	
	
	
	public DbConnector( ) {
	
		con = null;
		rs = null;
		psmt = null;
		userId = "freshman";
		JdbcHostName ="jdbc:mysql://partner.medialog.co.kr:3306/freshman";
		password = "freshman!$";
	}

	public void setCon( ) throws SQLException {
		con = DriverManager.getConnection(JdbcHostName,userId,password);
	}
	
	
	public Connection getCon() {
		return con;
	}


	public void setRs(ResultSet rs) {
		this.rs = rs;
	}

	public void setPsmt(java.sql.PreparedStatement preparedStatement) {
		this.psmt = preparedStatement;
	}

	public String getUserId() {
		return userId;
	}

	public String getJdbcHostName() {
		return JdbcHostName;
	}

	public String getPassword() {
		return password;
	}

	public ResultSet getRs() {
		return rs;
	}

	public java.sql.PreparedStatement getPsmt() {
		return psmt;
	}
}
	
	

